package com.ruoyi.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TmdDutyDatePeopleMapper;
import com.ruoyi.system.domain.TmdDutyDatePeople;
import com.ruoyi.system.service.ITmdDutyDatePeopleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 排班Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-20
 */
@Service
public class TmdDutyDatePeopleServiceImpl implements ITmdDutyDatePeopleService 
{
    @Autowired
    private TmdDutyDatePeopleMapper tmdDutyDatePeopleMapper;

    /**
     * 查询排班
     * 
     * @param id 排班主键
     * @return 排班
     */
    @Override
    public TmdDutyDatePeople selectTmdDutyDatePeopleById(Long id)
    {
        return tmdDutyDatePeopleMapper.selectTmdDutyDatePeopleById(id);
    }

    @Override
    public List<TmdDutyDatePeople> selectTmdDutyDatePeopleByAppId(Long id) {
        return tmdDutyDatePeopleMapper.selectTmdDutyDatePeopleByAppId(id);
    }

    /**
     * 查询排班列表
     * 
     * @param tmdDutyDatePeople 排班
     * @return 排班
     */
    @Override
    public List<TmdDutyDatePeople> selectTmdDutyDatePeopleList(TmdDutyDatePeople tmdDutyDatePeople)
    {
        return tmdDutyDatePeopleMapper.selectTmdDutyDatePeopleList(tmdDutyDatePeople);
    }

    /**
     * 新增排班
     * 
     * @param tmdDutyDatePeople 排班
     * @return 结果
     */
    @Override
    public int insertTmdDutyDatePeople(TmdDutyDatePeople tmdDutyDatePeople)
    {
        return tmdDutyDatePeopleMapper.insertTmdDutyDatePeople(tmdDutyDatePeople);
    }
    public int insertTmdDutyDatePeopleList(List<TmdDutyDatePeople> tmdDutyDatePeople)
    {
        return tmdDutyDatePeopleMapper.insertTmdDutyDatePeopleList(tmdDutyDatePeople);
    }

    /**
     * 修改排班
     * 
     * @param tmdDutyDatePeople 排班
     * @return 结果
     */
    @Override
    public int updateTmdDutyDatePeople(TmdDutyDatePeople tmdDutyDatePeople)
    {
        return tmdDutyDatePeopleMapper.updateTmdDutyDatePeople(tmdDutyDatePeople);
    }

    /**
     * 批量删除排班
     * 
     * @param ids 需要删除的排班主键
     * @return 结果
     */
    @Override
    public int deleteTmdDutyDatePeopleByIds(String ids)
    {
        return tmdDutyDatePeopleMapper.deleteTmdDutyDatePeopleByIds(Convert.toStrArray(ids));
    }
    @Override
    public int deleteTmdDutyDatePeopleByAppIds(String ids)
    {
        return tmdDutyDatePeopleMapper.deleteTmdDutyDatePeopleByAppIds(Convert.toStrArray(ids));
    }

    /**
     * 删除排班信息
     * 
     * @param id 排班主键
     * @return 结果
     */
    @Override
    public int deleteTmdDutyDatePeopleById(Long id)
    {
        return tmdDutyDatePeopleMapper.deleteTmdDutyDatePeopleById(id);
    }

    @Override
    public List<TmdDutyDatePeople> getAllPeopleByApp(Long id) {
        return tmdDutyDatePeopleMapper.getAllPeopleByApp(id);
    }


}
